<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="keywords" content="租房,买房,三棵松,地产,中介" />
<meta name="description" content="三棵松地产" />
<title>三棵松地产</title>
<link type="text/css" rel="stylesheet" href="${basePath}sks/css/frontpages/common.css">
<link type="text/css" rel="stylesheet" href="${basePath}sks/css/frontpages/houseInfo.css">
<script type="text/javascript" src="/js/jquery-1.3.1.min.js"></script>
<script type="text/javascript" src="${basePath}sks/js/frontpages/jquery.cookie.js"></script>
<link type="text/css" href="${basePath}map/css/map.css" rev="stylesheet" rel="stylesheet">
<script type="text/javascript" src="http://api.map.baidu.com/api?v=1.2"></script> 
<script type="text/javascript" src="${basePath}map/js/simpleMap.js"></script>
<script type="text/javascript">
var showMap = #if( ${house.building.lng} && ${house.building.lat} ) "true" #else "false" #end;
function bodyOnLoad() {
	if (!showMap) {
		var name = '${house.building.name}';
		var lng = '${house.building.lng}';
		var lat = '${house.building.lat}';
		var str = lng + '|' + lat;
		var data = {
			name : name,
			point : str
		};
		initMap(data);
	} else {
		var container = document.getElementById('container');
		var imgNode = document.createElement('img');
		imgNode.src = "${basePath}sks/img/frontpages/nohouse.jpg";
		//imgNode.width = '670';
		imgNode.height = '300';
		//imgNode.style = "align:center;";
		container.appendChild(imgNode);
	}
}
</script>
</head>
<body onload="bodyOnLoad();">
<div class="wrap">
	<!--\#include virtual="/sks/frontpages/header.jsp" -->
	<div>
		<div>
			<a href="${basePath}" hidefocus="true">SKS房地产</a> &gt;
			<a href="${basePath}sks/house.do?method=list&menuName=${menuName}" target="_self" hidefocus="true">
				#if(${isRent}) 租房 #else 买房 #end</a> &gt;					
			<a href="${basePath}sks/house.do?method=info&menuName=${menuName}&houseId=${house.houseId}" hidefocus="true">${house.title}</a>
		</div>		
		<div class="clear"></div>
	</div>
	<div class="house_detail bc mb10">
		<h2 title="${house.title}">${house.title}</h2>
		<div class="house_detail_wrap clearfix">
			<div class="house_detail_l fl ml10">
				<div class="imgCenter">
					<p>
						<img id="preview-img" src="${basePath}${firstPic.smallFullPathName}"
							onerror="this.src='${basePath}${firstPic.fullPathName}'"/>
					</p>
				</div>
				<div class="small_picture" style="margin-top: 10px;">
					<a class="small_left"><div title="上一张" id="aleft"></div></a>
					<div id="small_center">
						<ul style="width: 576px;" id="con">
						#foreach($picture in ${pictures})
							<li>
								<a href="javascript:void(0)" onclick="return false">
									<img src="${basePath}${picture.smallFullPathName}"
										onerror="this.src='${basePath}${picture.fullPathName}'"
										height="33" width="53">
								</a>
							</li>
					    #end
						</ul>
					</div>
					<a class="small_right"><div title="下一张" id="aright"></div></a>
				</div>
			</div>
			<div class="house_detail_m fl ml20" style="font-size: 1.2em; font-weight: bold;">
				<table>
					<tbody>
					#if(${isRent})
						<tr>
							<td colspan="2">
								租&nbsp;&nbsp;&nbsp;&nbsp;金：
								<span class="f22" style="color:#eb6100;"><strong>${house.rentPrice}</strong></span>元/月(${house.rentPayType.name})
							</td>
						</tr>
					#else
						<tr>
							<td colspan="2" class="td_wid">
								单&nbsp;&nbsp;&nbsp;&nbsp;价：<span class="f22"style="color:#eb6100;"><strong>${house.salePrice}</strong></span>元/平米
							</td>
						</tr>
					#end
						<tr><td height="10px"></td></tr>
						<tr>
							<td colspan="2">
								面&nbsp;&nbsp;&nbsp;&nbsp;积：${house.space}平米
							</td>
						</tr>
						<tr><td height="10px"></td></tr>
						<tr>
							<td colspan="2">
								小&nbsp;&nbsp;&nbsp;&nbsp;区：
								<a href="${basePath}/sks/districtInfo.do?method=base&menuName=village&buildingId=${house.building.buildingId}" target="_blank">${house.building.name}（查看小区信息）</a>
							</td>
						</tr>
						<tr><td height="10px"></td></tr>
						<tr>
							<td>
								户&nbsp;&nbsp;&nbsp;&nbsp;型：${house.houseType.name}
							</td>
							<td>
								物业类型：${house.propertyType.name}
							</td>
						</tr>
						<tr><td height="10px"></td></tr>
						<tr>
							<td>
								楼&nbsp;&nbsp;&nbsp;&nbsp;层：第${house.floorAt}层、共${house.floorAll}层
							</td>
							<td>
								建造年代：
									#if (! ${house.beginDate})
										暂无资料
									#else 
										<fmt:formatDate value="${house.beginDate}" type="date"/>
									#end
							</td>
						</tr>
						<tr><td height="10px"></td></tr>
						<tr>
							<td colspan="2">
							联系经纪人：
								<div class="contact_person mb15 mt15 tl">
								#if ( ${house.employee.phone} )
								<strong>${house.employee.phone}</strong>
								#end
								<em>${house.employee.username}</em>
								</div>								
							</td>
						</tr>
					</tbody>
				</table>
				<p style="text-align: right;">
					<a href="javascript:void(0)" id="collectHouse" 
						onclick="add_attentioncommunity()"
						class="tit_b">收藏房源</a>		
				</p>
			</div>
			<div class="house_aboutr fr">
				<div style="margin-left:25px">
					<div class="shadow_img1" id="img"  >
					#if ( ${house.employee.imagePath} )
						<img style="vertical-align:middle;" height="172" width="122" src="${house.employee.imagePath}"/>
					#else 
						<img style="vertical-align:middle;" height="172" width="122" src="${basePath}images/noAavtar.jpg"/>
				    #end
					</div>
				</div>
				<p>	
				经纪人：${house.employee.username}
				<p>		
				#if ( ${house.employee.phone} )
				联系电话：<span class="color_c00 fb">${house.employee.phone}</span>
				#end		
			</div>
		</div>
	</div>
	<div class="house_about bc clearfix mb10">
		<div class="house_aboutl fl">
		<div>
			<div id="tab6" class="tab6 mb10">
				<ul class="tab6_nav clearfix">
					<li class="on">
						<span><a href="#description">房源描述</a></span>
					</li>
					#if ( ${videos} )
					<li>
						<span><a href="#video">房源视频</a></span>
					</li>
					#end
					<li>
						<span><a href="#pic">房源图片</a></span>
					</li>
					<li>
						<span><a href="#map">地理位置</a>
						</span>
					</li>
					<li>
						<span><a href="#gallery">小区信息</a></span>
					</li>
					<li class="tab6_nav_lastitem">
						<span><a href="#comment">评论</a></span>
					</li>
				</ul>
				<div class="tab6_con">
					<div id="description">
						${house.intro}
					</div>
					<div class="bd"></div>
				</div>
			</div>
			<!--房源视频-->
			#if ( ${videos} )
			<div id="video" class="info_mode house_photo mb10">
				<h2>
					<span><a href="#" name="houseimgs">房源视频</a></span>
				</h2>
				<div class="info_mode_wrap house_photo_con">
					#foreach($video in ${videos})
					<p>
						<embed src="${basePath}${video.fullPathName}" autoplay="false" autostart="false" width="485" height="200" align="middle" type="application/x-shockwave-flash"></embed>
					</p>
					<br>
					#end
				</div>
			</div>
			#end
			<!--房源图片-->
			#if ( ${pictures} )
			<div id="pic" class="info_mode house_photo mb10">
				<h2>
					<span><a href="#" name="houseimgs">房源图片</a></span>
				</h2>
				<div class="info_mode_wrap house_photo_con">
				#foreach($picture in ${pictures})
					#if ( ${picture.extension} != 'swf' )
					<p>
						<img class="sn_img" 
							title="${house.title} 图片仅供参考" alt="${house.title} 图片仅供参考"
							src="${basePath}${picture.fullPathName}" width="485">
					</p>
					<br>
					#end
				#end
				</div>
			</div>
			#end
			<!--位置-->
			<div id="map" class="info_mode mb20">
				<h2>
					<span><a href="#" name="housedes" onclick="return fasle;">${house.building.name}地图位置</a></span>
				</h2>
				<div class="info_mode_wrap">
					<div class="clearfix mt30 ml15 pb20">
						<div class="mapContainer" id="container" align="center"
							style="width: 90%; height: 300px; border: #ccc solid 1px; margin-top: 10px; margin-bottom: 10px; margin-left: 30px">
						</div>
						<div class="fl ml20" style="text-align: left; width: 80%">
							<p>
								<span>地址：</span>${house.building.address}
							</p>
							<p>
								<span>交通：</span>#if( ${house.building.trafficInfo} ) ${house.building.trafficInfo} #else 暂无资料 #end
							</p>
							<p>
								<span>地铁：</span>
								#if ( ${house.metroStation.metroName} ) 
								${house.metroStation.metroName}&nbsp;${house.metroStation.name}
								# else 
								${house.building.metroStation.metroName}&nbsp;${house.building.metroStation.name}
								#end
							</p>
							<p>
								<a href="#" target="_blank">查看大地图&gt;&gt;</a>
							</p>
						</div>
					</div>
				</div>
			</div>
			<!--周边-->
			<div class="info_mode mb10">
				<a name="gallery" id="gallery">&nbsp;</a>
				<h2>
					<span><a href="${basePath}client/action/districtInfo.do?method=base&=village&buildingId=${house.building.buildingId}" name="areainfos" onclick="return false;" target="_blank">${house.building.name}简介</a></span>
				</h2>
				<div class="info_mode_wrap">
					<div class="clearfix mt20">
						<div class="fl ml15">
							<a href="#"><img
								src="${basePath}${buildingfirstPic.fullPathName}"
								alt="${house.building.name}图片" height="220" width="351">
							</a>
						</div>
						<div class="fl ml30 zhoubian_info">
							<p>
								<span>学校：</span>
								#if ( ${house.building.educate} ) 
								${house.building.educate}
								#else 暂无资料 #end
							</p>
							<p>
								<span>购物：</span>
								#if ( ${house.building.trade} ) 
								${house.building.trade}
								#else 暂无资料 #end
							</p>
							<p>
								<span>银行：</span>
								#if ( ${house.building.financial} ) 
								${house.building.financial}
								#else 暂无资料 #end
							</p>
							<p>
								<span>医院：</span>
								#if ( ${house.building.medical} ) 
								${house.building.medical}
								#else 暂无资料 #end
							</p>
							<p class="last_p">
								<a href="${basePath}/sks/districtInfo.do?method=base&menuName=village&buildingId=${house.building.buildingId}" target="_blank">查看${house.building.name}详细信息&gt;&gt;</a>
							</p>
						</div>
					</div>
					<div class="info_mode-row2">
						<div class="info_mode-row2_tit">
							<h6 class="tl pl20">更多图片：</h6>
						</div>
						<ul class="clearfix">
						#foreach($buildingPicture in ${buildingPictures})
							<li><a class="pic" href="${basePath}${buildingPicture.fullPathName}" target="_blank">
								<img alt="小区图" src="${basePath}${buildingPicture.smallFullPathName}" height="148" width="180"
									onerror="this.src='${basePath}${buildingPicture.fullPathName}'" />
							</a></li>
						#end
						</ul>
					</div>
				</div>
			</div>
				
		    
		    <!-- 评论 -->
			<form action="/user/house/comment.do" method="post">
				<input type="hidden" name="method" value="add">
				<input type="hidden" id="houseId" name="houseId" value="${house.houseId}">
			<!--\#include virtual="/sks/frontpages/houses/comment4info.jsp" -->
			</form>
		</div>
		</div>
		<div class="side_content">
			<div class="historybox nolist">
				<h4 style="margin-bottom: 5px;">你最近浏览过的房源</h4>
				<table id="historyhouse">
					<tr style="display: none;" id="tempTr">
						<td width="5%" height="80px;"></td>
						<td width="40%" valign="middle">
							<a href="" target="_blank"><img src="" height="60px" width="95px" /></a>
						</td>
						<td valign="middle"><a href="" target="_blank"></a><br>
							<span></span><br> <span
							style="color: #eb6100; font-weight: bold;"></span><br></td>
					</tr>
				</table>
			</div>
			<div id="IFX_p13" style="clear: both; margin: 15px 0 15px 0px;"></div>
	
			<div
				style="width: 210px; height: 220px; margin: 0 auto; padding: 9px 0 9px 9px; margin-top: 5px;"
				id="adanjuke_zoneid_comm_001"></div>
		</div>			
	</div>
	<!--\#include virtual="/sks/frontpages/rooster.jsp" -->
</div>
</body>
<script type="text/javascript">
changeMenu('${menuName}');
isCollected();
function createHistoryHouse(obj, data) {
	var tr = document.getElementById("tempTr").cloneNode(true);
	tr.id = 'house_' + data.houseId;
	tr.style.display = '';
	tr.getElementsByTagName('a')[0].href = '${basePath}${housePath}'+ data.houseId +'.shtml';
	tr.getElementsByTagName('a')[1].href = '${basePath}${housePath}'+ data.houseId +'.shtml';
	tr.getElementsByTagName('a')[1].innerHTML = data.building;
	var _img = tr.getElementsByTagName('img')[0];
	if (null == data.img || '' == data.img) {
		_img.src = '${basePath}' + 'sks/img/frontpages/lack_house_b.png';
	} else {
		_img.src = '${basePath}' + data.img;
	}
	tr.getElementsByTagName('span')[0].innerHTML = '['+data.area+']'+data.space+'㎡';
	if (data.transaStatus == "1") {
		tr.getElementsByTagName('span')[1].innerHTML = data.salePrice + "/平方米*月";
	} else {
		tr.getElementsByTagName('span')[1].innerHTML = data.rentPrice + "/月";
	}
	obj.appendChild(tr);
}
function getHistoryHouse() {
	jQuery.post("/sks/house.do", {method:"history"},
    function (data, textStatus){
		var obj = document.getElementById('historyhouse');
        for (var i=0; i<data.length; i++) {
        	createHistoryHouse(obj, data[i]);
        }
    }, "json");
}
getHistoryHouse();

var aleft=document.getElementById("aleft");
var aright=document.getElementById("aright");
var big=document.getElementById("preview-img");
var small=document.getElementById("small_center");
var cont=document.getElementById("con");
var smallimg=cont.getElementsByTagName("img");
var a = 0;
var wd=64;
function addEventHandler(oTarget, sEventType, fnHandler) {
   if (oTarget.addEventListener) {
      oTarget.addEventListener(sEventType, fnHandler, false);
   } else {
      oTarget["on" + sEventType] = fnHandler;
   }
};
function tabchange(){
   for(var i=0;i<smallimg.length;i++){
   	  addEventHandler(smallimg[i],"click",function(){ changecss(this);});
   }
};
function changecss(ospan) {
   for(var i=0;i<smallimg.length;i++){
    if(ospan == smallimg[i]){
     big.src=smallimg[i].getAttribute('src');
	 big.jqimg=smallimg[i].getAttribute('wtsrc');
     big.alt=smallimg[i].alt;
     smallimg[i].parentNode.parentNode.className="selected";
     a=i;
    }else{
     smallimg[i].parentNode.parentNode.className="";
    }
   }
};
tabchange();

function add() {
   if(a<1){
    return false;
   };
   smallimg[a-1].parentNode.parentNode.className="selected";
   smallimg[a].parentNode.parentNode.className="";
   big.src=smallimg[a-1].getAttribute('src');
   big.jqimg=smallimg[a-1].getAttribute('wtsrc');
   big.alt=smallimg[a-1].alt;
   a--;
   if(small.scrollLeft<cont.offsetWidth){
	small.scrollLeft=small.scrollLeft-wd;
   }
};
aleft.onclick= function (){
   add();
};
function sub() {
   if(a>=smallimg.length-1){
    return false;
   };
   smallimg[a+1].parentNode.parentNode.className="selected";
   smallimg[a].parentNode.parentNode.className="";
   big.src=smallimg[a+1].getAttribute('src');
   big.jqimg=smallimg[a+1].getAttribute('wtsrc');
   big.alt=smallimg[a+1].alt;
   a++;
   if(small.scrollLeft<cont.offsetWidth){
    small.scrollLeft=small.scrollLeft+wd;
   }
};
aright.onclick=function (){
   sub();
};

$(document).ready(function(){
	toLoginstatus();
});

</script>
</html>
<!--
	开启 SSI 功能
	http://haitao.iteye.com/blog/1402165
 -->